package com.guangzi.mapper;

import com.guangzi.common.Pager;
import com.guangzi.entity.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PermissionDao extends BaseDao {

    List<Object> permissionListPagerCriteria(@Param("pager") Pager pager, @Param("query") Object obj);
    Long permissionCountCriteria(@Param("query") Object obj);
    void addPermission(Permission permission);
    void updatePermission(Permission permission);
    void updateStatus(@Param("permissionId") int permissionId,@Param("status") int status);

    //通过账号查询用户的权限集合
    List<Permission> listByAccount(String phone);
}
